layui.define('guidanceCtiy',function(exports) {
	var Zarea = layui.guidanceCtiy;
	var filter={
		gunidance:null,
		seter:function(options){
			if(typeof(options)==="string")console.error("gunidance must is object");
			this.gunidance = options;
			this.repaint();
		},
		geter:function(options){
			var options = options ||{};
			$.post(options.url,options.data,function(result){
				filter.gunidance =result.data;
				filter.repaint();
				if(options.fn)options.fn(filter.gunidance);
			});
    		return this;
		},
		update:function(options){
			if(typeof(options)==="string")console.error("gunidance must is object");
			this.gunidance = options;
			this.repaint();
			if(options.fn)options.fn(this.gunidance);
		},
		delete:function(options){  
			$.map(a, function(n){
				return n.code.substring(0,2) == o.substring(0,2) ? n : null;
			});
		},
		init:function(options){   //初始化
			this.gunidance = options||{} ;
			if(options.fn)options.fn(this.gunidance);
		},
		filter:function(options){   //筛选
		},	
		repaint:function(options){  //重绘
		}
	};
	
	
function uniqueArray(array, key){
    var result = [array[0]];
    for(var i = 1; i < array.length; i++){
        var item = array[i];
        var repeat = false;
        for (var j = 0; j < result.length; j++) {
            if (item[key] == result[j][key]) {
                repeat = true;
                break;
            }
        }
        if (!repeat) {
            result.push(item);
        }
    }
    return result;
}
	exports('filter',filter); //注意，这里是模块输出的核心，模块名必须和use时的模块名一致
});